package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdCollectionMapper;
import com.diankangwo.factory.entity.TdCollection;
import com.diankangwo.factory.service.TdCollectionServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("TdCollectionServices")
public class TdCollectionServicesImpl implements TdCollectionServices{

    @Autowired
    private TdCollectionMapper tdCollectionMapper;

    @Override
    @Transactional
    public int deleteByPrimaryKey(Integer id) {
        return tdCollectionMapper.deleteByPrimaryKey(id);
    }

    @Override
    @Transactional
    public int insert(TdCollection record) {
        return tdCollectionMapper.insert(record);
    }

    @Override
    @Transactional
    public int insertSelective(TdCollection record) {
        return tdCollectionMapper.insertSelective(record);
    }

    @Override
    public TdCollection selectByPrimaryKey(Integer id) {
        return tdCollectionMapper.selectByPrimaryKey(id);
    }

    @Override
    @Transactional
    public int updateByPrimaryKeySelective(TdCollection record) {
        return tdCollectionMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(TdCollection record) {
        return tdCollectionMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TdCollection> queryByDay(String startTime, String endTime) {
        return tdCollectionMapper.queryByDay(startTime,endTime);
    }
}
